﻿using JTTD.Common.Enum;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace JTTD.DataBase.Model.ShopCoupon
{
    /// <summary>
    /// 店铺优惠券
    /// </summary>
    [Table("t_shopcoupon_info")]
    public  class ShopCouponInfoModel:BaseModel
    {
        /// <summary>
        /// 店铺优惠券编号
        /// </summary>
        [Column("shopCouponNumber")]
        public string ShopCouponNumber { get;  set; }= "No" + DateTime.Now.Ticks;
        /// <summary>
        /// 开始时间
        /// </summary>
        [Column("startTime")]
        public DateTime StartTime { get; set; }
        /// <summary>
        /// 结束时间
        /// </summary>
        [Column("endTime")]
        public DateTime EndTime { get; set; }

        /// <summary>
        /// 优惠券类型（满减优惠券：0，代金券：1）
        /// </summary>
        [Column("type")]
        public ShopCouponTypeEnum Type { get; set; }

        /// <summary>
        /// 满足金额
        /// </summary>
        [Column("fullAmount")]
        public decimal FullAmount { get; set; }
        /// <summary>
        /// 优惠券/代金券金额
        /// </summary>
        [Column("couponAmount")]
        public decimal CouponAmount { get; set; }
        /// <summary>
        /// 领取时间
        /// </summary>
        [Column("createTime")]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 用户id
        /// </summary>
        [Column("userId")]
        public int UserId { get; set; }

        /// <summary>
        /// 是否使用
        /// </summary>
        [Column("isUse")]
        public bool IsUse { get; set; }

        /// <summary>
        /// 店铺id
        /// </summary>
        [Column("shopId")]
        public int ShopId { get; set; }
    }
}
